POST
/
toptimize
/
v1
/
predictions
curl --request POST \
  --url https://api.topsort.com/toptimize/v1/predictions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "metrics": {
    "ctr": true
  },
  "opaqueUserId": "u_9ske45",
  "productIds": [
    "p_PJbnN",
    "p_ojng4"
  ]
}'
{
  "objectType": "listing",
  "predictions": [
    {
      "productId": "p_PJbnN",
      "ctr": 0.03
    },
    {
      "productId": "p_ojng4",
      "ctr": 0.056
    }
  ],
  "error": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

⚠️ Beta Access Required

Contact your sales representative to gain access to this endpoint and start using it.

The context information for the predictions, including which metrics to predict.

The body is of type object.

Response

200
application/json

The prediction results. This will provide a numerical value for each combination of metric/product requested on the API call.

The response is of type object.